package com.shuyun.api.provider.controller;

import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.URLUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: shuai.chen@shuyun.com
 * @date: 2022/1/10 10:54 上午
 */
@Slf4j
@RestController
@RequestMapping("api/callback")
public class CallbackController {

    @PostMapping("receiveToken")
    public Object receiveToken(@RequestBody String param, String callBackTime, String sign){
        log.info("callBackTime: {}, sign: {}", callBackTime, sign);
        // todo 校验sign
        log.info("param: {}", param);
        // todo 存储token

        // 返回正确格式的响应
        String result = "{\"code\":200,\"msg\":\"SUCCESS\",\"data\":\"\"}";
        return result;
    }

}
